package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 问答
 */
@Getter
@Setter
public class QuestionsAndAnswers extends BaseDomain {
    public static final int TYPE_COMMON = 0;//最新问题
    public static final int STATE_DISABLE = 1;//待回答问题
    public static final int TYPE_HOT = 2;//热门问题
    //标题
    private String title;
    //作者
    private User author;
    //封面
    private String coverUrl;
    //地区
    private String place;
    //发布时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMD+8")
    private Date createTime;
    //问题内容
    private QuestionsContent content;
    //类型
    private Integer type = TYPE_COMMON;

}